package view;

import controller.SessionController;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

/**
 *
 * @author ZimmE
 */
@Named
@RequestScoped
public class MenuView {

    @EJB
    private SessionController sessionController;

    /**
     * Delegate method for logout
     */
    public String logout() {
        sessionController.logout();
        return "/index" + "?faces-redirect=true";
    }

    /**
     * Delegate method for isAuthenticated
     *
     * @return true or false
     */
    public boolean isAuthenticated() {
        return sessionController.isAuthenticated();
    }
}
